/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gap.entities;

import com.buanalintas.framework.entities.MasterUnit;
import com.buanalintas.framework.entities.MasterUser;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Mrs Yun KZ
 */
@Entity
@Table(name = "gap_transaction_revision")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "GapTransactionRevision.findAll", query = "SELECT g FROM GapTransactionRevision g"),
    @NamedQuery(name = "GapTransactionRevision.findByRevisionId", query = "SELECT g FROM GapTransactionRevision g WHERE g.revisionId = :revisionId"),
    @NamedQuery(name = "GapTransactionRevision.findByRevisionEmployeeName", query = "SELECT g FROM GapTransactionRevision g WHERE g.revisionEmployeeName = :revisionEmployeeName"),
    @NamedQuery(name = "GapTransactionRevision.findByRevisionDate", query = "SELECT g FROM GapTransactionRevision g WHERE g.revisionDate = :revisionDate"),
    @NamedQuery(name = "GapTransactionRevision.findByRevisionLast", query = "SELECT g FROM GapTransactionRevision g WHERE g.revisionLast = :revisionLast"),
    @NamedQuery(name = "GapTransactionRevision.findByRevisionCurrent", query = "SELECT g FROM GapTransactionRevision g WHERE g.revisionCurrent = :revisionCurrent"),
    @NamedQuery(name = "GapTransactionRevision.findByRevisionValue", query = "SELECT g FROM GapTransactionRevision g WHERE g.revisionValue = :revisionValue"),
    @NamedQuery(name = "GapTransactionRevision.findByRevisionPlatform", query = "SELECT g FROM GapTransactionRevision g WHERE g.revisionPlatform = :revisionPlatform"),
    @NamedQuery(name = "GapTransactionRevision.findByRevisionNumber", query = "SELECT g FROM GapTransactionRevision g WHERE g.revisionNumber = :revisionNumber"),
    @NamedQuery(name = "GapTransactionRevision.findByRevisionKnownBy", query = "SELECT g FROM GapTransactionRevision g WHERE g.revisionKnownBy = :revisionKnownBy"),
    @NamedQuery(name = "GapTransactionRevision.findByRevisionTimestamp", query = "SELECT g FROM GapTransactionRevision g WHERE g.revisionTimestamp = :revisionTimestamp")})
public class GapTransactionRevision implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "revision_id")
    private String revisionId;
    @Column(name = "revision_employee_name")
    private String revisionEmployeeName;
    @Column(name = "revision_item")
    private String revisionItem;
    @Column(name = "revision_date")
    @Temporal(TemporalType.DATE)
    private Date revisionDate;
    @Column(name = "revision_item_price")
    private BigDecimal revisionItemPrice;
    @Column(name = "revision_discount_nominal")
    private BigDecimal revisionDiscountNominal;
    @Column(name = "revision_last")
    private BigDecimal revisionLast;
    @Column(name = "revision_current")
    private BigDecimal revisionCurrent;
    @Column(name = "revision_value")
    private BigDecimal revisionValue;
    @Column(name = "revision_platform")
    private BigDecimal revisionPlatform;
    @Column(name = "revision_number")
    private String revisionNumber;
    @Column(name = "revision_known_by")
    private String revisionKnownBy;
    @Lob
    @Column(name = "revision_description")
    private String revisionDescription;
    @Column(name = "revision_timestamp")
    @Temporal(TemporalType.TIMESTAMP)
    private Date revisionTimestamp;
    @JoinColumn(name = "revision_pos_id", referencedColumnName = "pos_id")
    @ManyToOne
    private GapTransactionEmployee revisionPosId;
    @JoinColumn(name = "revision_employee_id", referencedColumnName = "employee_id")
    @ManyToOne
    private GapMasterEmployee revisionEmployeeId;
    @JoinColumn(name = "revision_unit_id", referencedColumnName = "unit_id")
    @ManyToOne
    private MasterUnit revisionUnitId;
    @JoinColumn(name = "revision_user_id", referencedColumnName = "user_id")
    @ManyToOne
    private MasterUser revisionUserId;
    

    public GapTransactionRevision() {
    }

    public GapTransactionRevision(String revisionId) {
        this.revisionId = revisionId;
    }

    public String getRevisionId() {
        return revisionId;
    }

    public void setRevisionId(String revisionId) {
        this.revisionId = revisionId;
    }

    public String getRevisionEmployeeName() {
        return revisionEmployeeName;
    }

    public void setRevisionEmployeeName(String revisionEmployeeName) {
        this.revisionEmployeeName = revisionEmployeeName;
    }

    public Date getRevisionDate() {
        return revisionDate;
    }

    public void setRevisionDate(Date revisionDate) {
        this.revisionDate = revisionDate;
    }

    public BigDecimal getRevisionLast() {
        return revisionLast;
    }

    public void setRevisionLast(BigDecimal revisionLast) {
        this.revisionLast = revisionLast;
    }

    public BigDecimal getRevisionCurrent() {
        return revisionCurrent;
    }

    public void setRevisionCurrent(BigDecimal revisionCurrent) {
        this.revisionCurrent = revisionCurrent;
    }

    public BigDecimal getRevisionValue() {
        return revisionValue;
    }

    public void setRevisionValue(BigDecimal revisionValue) {
        this.revisionValue = revisionValue;
    }

    public BigDecimal getRevisionPlatform() {
        return revisionPlatform;
    }

    public void setRevisionPlatform(BigDecimal revisionPlatform) {
        this.revisionPlatform = revisionPlatform;
    }

    public MasterUnit getRevisionUnitId() {
        return revisionUnitId;
    }

    public void setRevisionUnitId(MasterUnit revisionUnitId) {
        this.revisionUnitId = revisionUnitId;
    }

    public MasterUser getRevisionUserId() {
        return revisionUserId;
    }

    public void setRevisionUserId(MasterUser revisionUserId) {
        this.revisionUserId = revisionUserId;
    }

   

    public String getRevisionNumber() {
        return revisionNumber;
    }

    public void setRevisionNumber(String revisionNumber) {
        this.revisionNumber = revisionNumber;
    }

    public String getRevisionKnownBy() {
        return revisionKnownBy;
    }

    public void setRevisionKnownBy(String revisionKnownBy) {
        this.revisionKnownBy = revisionKnownBy;
    }

    public String getRevisionDescription() {
        return revisionDescription;
    }

    public void setRevisionDescription(String revisionDescription) {
        this.revisionDescription = revisionDescription;
    }

    public Date getRevisionTimestamp() {
        return revisionTimestamp;
    }

    public void setRevisionTimestamp(Date revisionTimestamp) {
        this.revisionTimestamp = revisionTimestamp;
    }

    public GapTransactionEmployee getRevisionPosId() {
        return revisionPosId;
    }

    public void setRevisionPosId(GapTransactionEmployee revisionPosId) {
        this.revisionPosId = revisionPosId;
    }

    public String getRevisionItem() {
        return revisionItem;
    }

    public void setRevisionItem(String revisionItem) {
        this.revisionItem = revisionItem;
    }

    public BigDecimal getRevisionItemPrice() {
        return revisionItemPrice;
    }

    public void setRevisionItemPrice(BigDecimal revisionItemPrice) {
        this.revisionItemPrice = revisionItemPrice;
    }

    public BigDecimal getRevisionDiscountNominal() {
        return revisionDiscountNominal;
    }

    public void setRevisionDiscountNominal(BigDecimal revisionDiscountNominal) {
        this.revisionDiscountNominal = revisionDiscountNominal;
    }

    public GapMasterEmployee getRevisionEmployeeId() {
        return revisionEmployeeId;
    }

    public void setRevisionEmployeeId(GapMasterEmployee revisionEmployeeId) {
        this.revisionEmployeeId = revisionEmployeeId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (revisionId != null ? revisionId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GapTransactionRevision)) {
            return false;
        }
        GapTransactionRevision other = (GapTransactionRevision) object;
        if ((this.revisionId == null && other.revisionId != null) || (this.revisionId != null && !this.revisionId.equals(other.revisionId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.gap.entities.GapTransactionRevision[ revisionId=" + revisionId + " ]";
    }
    
}
